<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{$data.title}_{$data.title}的做法_烘焙圈</title>
	<meta name="keywords" content="{$data.title},{$data.title}的做法,{$data.title}的制作方法,{$data.title}图片大全"/>
	<meta name="description" content="{$data.nickname}在烘焙圈分享了{$data.title}的做法，而且通过图文并茂的方式，详细说明了制作{$data.title}所用时间、用料、步骤、窍门，烘焙圈导师和作者通过留言互动方式，为烘焙爱好者解答{$data.title}制作过程中遇到的烘焙问题。"/>
	
    <link rel="stylesheet" href="__CSS__/global.css" />
    <link rel="stylesheet" href="__CSS__/yf.css" />
    <link rel="stylesheet" type="text/css" href="__COMMJS__/yf_photo/photo.css" />
    <Admintemplate file="Home/Public/global_js"/>
    <script src="__JS__/jquery.min.js"></script>
</head>
<body>
<div class="b-page">
<include file="Public:header" />

<div class="b-zuopin">
<div class="b-zuopin__body">
<div class="b-zuopin__left">
<div class="b-zuopinTitle">{$data.title}</div>
<div class="b-zuopinInfo">
    <img src="__IMAGES__/icon_quanzi_view.png" class="pic_mid"><span>浏览{$data.clicknum}次</span>
    <span class="b-zuopinInfo__line">|</span>
    <a href="#msg"><i class="b-messageIcon pic_mid"></i>{$data.msgnum}</a>
    <span class="b-zuopinInfo__line">|</span>
    <a href="#dig"><i class="b-dingIcon pic_mid"></i>{$data.goodnum}</a>
    <span class="b-zuopinInfo__line">|</span>
    <a href="#dig"><i class="b-caiIcon pic_mid"></i>{$data.badnum}</a>
    <span class="b-zuopinInfo__line">|</span>
    <div id="bd-share"><i class="b-fenxiangIcon pic_mid"></i>分享
        <!-- bd-sharing begin -->
        <div class="bdsharebuttonbox bd-share-code">
            <a href="#" rel="nofollow" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
            <a href="#" rel="nofollow" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
            <a href="#" rel="nofollow" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
            <a href="#" rel="nofollow" class="bds_duitang" data-cmd="duitang" title="分享到堆糖"></a>
            <a href="#" rel="nofollow" class="bds_huaban" data-cmd="huaban" title="分享到花瓣"></a>
            <a href="#" rel="nofollow" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
        </div>
        <script>
            window._bd_share_main = undefined;
            window._bd_share_config = {
                common : {
                    bdText : '{$data.title}',
                    bdDesc : '{$data.content|str_cut=50}',
                    bdUrl : '__WEBURL__/works/{$data.workid}',
                    bdPic : '__FILESURL__{$data.image}'
                },
                share : {
                    "bdSize" : 24
                }
            }
            with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
        </script>
    </div>
        <!-- bd-sharing end -->

</div>
 	<div class="b-zuopinPic yf-img" data-img="{$data.thumb}" data-thumb="{$data.pic}" data-title="{$data.title}">
        <div style="width: 600px;height: 400px;background-image: url(__FILESURL__{$data.image});background-repreat: no-repreat;background-position: center;background-size: cover;"></div>
        <div class="yf-view">
            <span class="yf-view-img"></span>
            <span class="yf-view-span">{$data.pic_num}&nbsp;张图片</span>
        </div>
    </div>
    <a name="dig"></a>
    <div class="b-zuopinZancai">
        	<if condition="$digtype.id gt 0">
            <a data-url="do/canceldig/" class="R_ajax_trip" data-info="infoid,{$data.workid}">
            <div class="b-zuopinZancai__item">
                <if condition="$digtype.digtype eq 1">
                    <span>取消点赞</span>
                    <else/>
                    <span>取消差评</span>
                </if>
               </div>
            </a>
            <else/>
            <a data-url="do/adddig/" class="R_ajax_trip" data-info="infoid,{$data.workid}~digtype,0"><div class="b-zuopinZancai__item">
                    <span>一般</span>
                </div></a>
            <a data-url="do/adddig/" class="R_ajax_trip" data-info="infoid,{$data.workid}~digtype,1"><div class="b-zuopinZancai__item">
                    <span>点赞</span>
                </div></a>
        </if>
    </div>
<div class="b-zuopinJianjie">
    <div class="b-zuopinTitle b-zuopinTitle-jj">简介</div>
    <div class="b-zuopinJianjie__text">
        {$data.content|nl2br}
    </div>
</div>
<div class="b-zuopinYongliao">
    <div class="b-zuopinTitle noborder b-zuopinTitle-yl">用料</div>
    <!-- <table class="b-zuopinYongliao__table">
        <tbody class="b-zuopinYongliao__tbody">
        <foreach name="data.WorksMaterials" item="wm">
            <tr class="b-zuopinYongliao__tr">
                <td class="b-zuopinYongliao__td name">{$wm.mname}</td>
                <td class="b-zuopinYongliao__td liang">{$wm.mvalue}</td>
            </tr>
        </foreach>
        </tbody>
    </table>-->
    <div class="yf-zuopinYongliao-ul">
    <foreach name="data.WorksMaterials" item="wm">
    	<if condition="$key%2 eq 0">
    		<div class="yf-zuopinYongliao-li">
				<p class="yf-zuopinYongliao-p">{$wm.mname}<span>{$wm.mvalue}</span></p>
			</div>
    	</if>
    	<if condition="$key%2 neq 0">
    		<div class="yf-zuopinYongliao-li yf-zuopinYongliao-right">
				<p class="yf-zuopinYongliao-p">{$wm.mname}<span>{$wm.mvalue}</span></p>
			</div>
    	</if>
	</foreach>	
	<if condition="$data.WorksMaterials_count % 2 neq 0">
		<div class="yf-zuopinYongliao-li yf-zuopinYongliao-right">
			<p class="yf-zuopinYongliao-p">&nbsp;<span>&nbsp;</span></p>
		</div>
	</if>
		<div class="yf-clear"></div>
    </div>
</div>
<div class="b-zuopinZuofa">
    <div class="b-zuopinTitle b-zuopinTitle-zf">{$data.title}的做法步骤</div>
    <div class="b-zuopinZuofa__list">
        <foreach name="data.WorksMakestep" key="k" item="wms">
        <div class="b-zuopinZuofa__item">
            <div class="b-zuopinZuofa__itemText">
                {$wms.scontent}
            </div>
            <div class="b-zuopinZuofa__itemPic"><img src="__FILESURL__{$wms.simage}"></div>
            <div class="b-zuopinZuofa__itemNum">{$k+1}</div>
        </div>
        </foreach>

    </div>
</div>
<!-- zuopinTips -->
    <if condition="$data.note neq ''">
    <div class="b-zuopinTips">
        <div class="b-zuopinTips__title">小贴士</div>
        <div class="b-zuopinTips__text">
            {$data.note|nl2br}
        </div>
    </div>
    </if>
    <!-- zuopinTips -->

<div class="b-zuopinUpload yf-zuopinUpload">
    <a href="__WEBURL__/u/{$data.openuid}" class="b-zuopinUpload__pic">
        <img class="l-full" src="{$data.uavatar|getUavatar}" alt="">
        <i class="b-popOtherZuopin__itemMask"></i>
    </a>
    <div class="b-zuopinUpload__name">
        <a href="__WEBURL__/u/{$data.openuid}">{$data.nickname}</a>
        <if condition="$data.ifrz eq 1">
        <a href="__WEBURL__/us/renzheng.html"><i class="b-renzhengIcon pic_mid"></i></a>
        </if>
    </div>
    <div class="b-zuopinUpload__title">
        <span>{$data.title}的做法</span>
    </div>
    <a href="__WEBURL__/user/bake/copyadd?wid={$data.workid}" class="b-zuopinUpload__btn yf-zuopinUpload__btn"><img src="__IMAGES__/ssp_photo.png" class="pic_mid yf_pic_mid" style="margin-right:10px;" alt="">上传作品</a>
</div>
<div class="b-zuopinView">
    <div class="b-popLeftZan__title">{$data.goodnum} 赞</div>
    <div class="b-zuopinView__list">
        <foreach name="diglist" item="dl">
            <a href="__WEBURL__/u/{$dl.openuid}" class="b-zuopinView__item">
                <img class="l-full" src="{$dl.uavatar|getUavatar}" alt="">
                <i class="b-popOtherZuopin__itemMask"></i>
            </a>
        </foreach>
        <if condition="data.goodnum gt 20">
        <a href="__WEBURL__/member/dig?workid={$data.workid}" class="b-zuopinView__more">更多</a>
        </if>
    </div>
</div>
<!-- fayan -->
    <a name="msg"></a>
<div class="b-zuopinFayan">
    <a href="__WEBURL__/u/{$userinfo.openuid}" class="b-zuopinFayan__pic">
            <img class="l-full" src="{$userinfo.uavatar|getUavatar}" alt="">
        <i class="b-popOtherZuopin__itemMask"></i>
    </a>

    <form onSubmit="return false">
        <textarea name="content" id="content" cols="30" title="评论至少10个字! " required data-len="3" rows="10" class="b-zuopinFayan__textarea"></textarea>
        <input type="hidden" id="infoid" value="{$data.workid}"/>
        <input type="hidden" id="msgType" value="1"/>
        <button class="b-zuopinFayan__btn" id="sendMsg_btn">评论</button>
    </form>

</div>
<!-- fayan -->
<!-- huiying -->
    <if condition="$msgcount gt 0">
<div class="b-huiying">
    <div class="b-huiying__title">{$data.title}的评论({$msgcount}个)</div>
    <div class="b-huiying__list">
        <include file="Public:msglist" />
    </div>
</div>
    </if>
<!-- huiying -->

</div>
<div class="b-zuopin__right">
    <!-- zuopinUser -->
    <div class="b-zuopinUser">
        <a href="__WEBURL__/u/{$data.openuid}" class="b-zuopinUser__pic mask">
            <img src="{$data.uavatar|getUavatar}" alt="">
            <i class="b-popOtherZuopin__itemMask"></i>
        </a>
        <div class="b-zuopinUser__name">
            <a href="__WEBURL__/u/{$data.openuid}">{$data.nickname}烘焙圈</a>
            <if condition="$data.ifrz eq 1">
            <a href="__WEBURL__/us/renzheng.html"><i class="b-renzhengIcon pic_mid"></i></a>
            </if>
        </div>
        <div class="b-zuopinUser__shejiao">
            <a href="{$data.uweibo}" target="_blank" class="b-zuopinUser__shejiaoItem" style="margin-right:5px;">
                <span>新浪微博</span>
                <i class="b-shareIcon pic_mid"></i>
            </a>
            <a href="{$data.uqqzone}" target="_blank" class="b-zuopinUser__shejiaoItem">
                <span>QQ空间</span>
                <i class="b-qqzoneIcon pic_mid"></i>
            </a>
        </div>
    </div>
    <!-- zuopinUser -->
    <!-- zuopinPingfen -->
    <div class="b-zuopinPingfen">
        <div class="b-zuopinPingfen__left">
            <p class="b-zuopinPingfen__p1">{$dig.digavg}</p>
            <p class="b-zuopinPingfen__p2">综合评分</p>
        </div>
        <div class="b-zuopinPingfen__right">
            <p><span>大家对这个作品的评价</span><b>({$digallnum}份)</b></p>
            <p class="b-zuopinPingfen__l1">
                <span class="b-zuopinPingfen__l2">好极了</span>
                <span class="b-zuopinPingfen__l3"><i class="i1" style="width: {$dig.goodprecent}px"></i></span>
                <span class="b-zuopinPingfen__l4">{$data.goodnum}</span>
            </p>
            <p class="b-zuopinPingfen__l1">
                <span class="b-zuopinPingfen__l2">一般</span>
                <span class="b-zuopinPingfen__l3"><i class="i3" style="width: {$dig.badprecent}px"></i></span>
                <span class="b-zuopinPingfen__l4">{$data.badnum}</span>
            </p>
        </div>
    </div>
    <!-- zuopinPingfen -->

    <!-- zuopinShoucang -->
    <div class="b-zuopinShoucang">
        <if condition="$favoritenum gt 0">
            <a data-url="do/cancelfavorite/" class="R_ajax_link b-zuopinShoucang__btn" data-info="infoid,{$data.workid}">取消收藏</a>

            <else/>
        <a data-url="do/addfavorite/" class="R_ajax_link b-zuopinShoucang__btn" data-info="infoid,{$data.workid}">我要收藏</a>
        </if>
        <div class="b-zuopinShoucang__text">
            该作品创建于 <span>{$data.create_time|date='Y-m-d',###}</span> ，已有 <span>{$data.favoritenum|getNullNum}</span> 收藏<br>版权归作者所有，没有作者本人的书面许可任何人不得转载或使用整体或任何部分的内容。
        </div>
    </div>
    <!-- zuopinShoucang -->
    <foreach name="rightad" item="ra">
        <a href="__FILESURL__{$ra.linkurl}" class="b-slideAdvert"><img src="__FILESURL__{$ra.image}"></a>
    </foreach>
    
    <!-- zuopinCanzhao -->
    <if condition="$data.copynum gt 0">
    <div class="b-zuopinCanzhao">
        <div class="b-zuopinCanzhao__title">
            <p>参照这个作品，大家做出 <span style="color: red;font-size: 18px;">{$data.copynum|getNullNum}</span> 个作品</p>
        </div><!-- <a href="__WEBURL__/copy/list?wid={$data.workid}">{$data.copynum|getNullNum}</a> -->
        <div class="b-zuopinCanzhao__list">
            <div class="b-zuopinCanzhao__listBody">
                <div class="b-zuopinCanzhao__listItem">

                    <foreach name="copylist" item="cl">
                    <div class="b-zuopinCanzhao__listItemLeft">
                        <div class="b-zuopinCanzhao__listItemTime">{$cl.create_time|format_time}</div>
                        <a href="__WEBURL__/copy/{$cl.workid}" class="b-zuopinCanzhao__listItemPic">
                            <img class="l-full" src="__FILESURL__/{$cl.image}">
                            <i class="b-popOtherZuopin__itemMask"></i>
                        </a>
                        <div class="b-zuopinCanzhao__listItemText">
                            {$cl.title}
                        </div>
                        <div>
                            <a href="__WEBURL__/u/{$cl.openuid}" class="b-zuopinCanzhao__listItemIcon pic_mid">
                                <img class="l-full" src="{$cl.uavatar|getUavatar}">
                                <i class="b-popOtherZuopin__itemMask"></i>
                            </a>
                            <a href="__WEBURL__/u/{$cl.openuid}" class="b-zuopinCanzhao__listItemName">{$cl.nickname}</a>
                        </div>
                    </div>
                    </foreach>
                </div>

                <div class="b-zuopinCanzhao__more">
                    <a href="__WEBURL__/copy/clist?wid={$data.workid}">查看全部作品</a>
                </div>

            </div>
        </div>
    </div>
    </if>
    <!-- zuopinCanzhao -->

</div>
</div>
</div>

<include file="Public:footer" />
</div>
<div id="yf-show"></div>
<script src="__JS__/index.js"></script>
<script src="__JS__/jquery.common.js?v=20150101"></script>
<script src="__JS__/jquery.doajax.js"></script>
<script src="__COMMJS__/yf_photo/photo.js"></script>
<script>
    $(document).ready(function(){

        $("#bd-share").mouseover(function(e){
            e.preventDefault();
            $(".bd-share-code").slideDown(500);
        });
        $(".bd-share-code").mouseleave(function(){
            $(this).slideUp(500);
        });

        $('.b-dongtaiItem').each(function(i,val){
            if(i%3==0) $(this).addClass('b-dongtaiItem_first');
        });

/*
        var img = $('.b-zuopinPic img');
        var realHeight;//真实的高度
        $("<img/>").attr("src", $(img).attr("src")).load(function() {
            realHeight = this.height;
            if(realHeight>400){
                var margintop=(realHeight-400)/2;
                img.css('marginTop','-'+margintop+'px');
            }
            $('.b-zuopinPic').on('click', function () {
                var obj = $(this);
                if (obj.hasClass('act')) {
                    obj.animate({height: '400px'}, function () {
                        obj.removeClass('act');
                    });
                    $('.b-zuopinPic img').animate({marginTop:'-'+margintop+'px'})
                } else {
                    obj.animate({height: realHeight + 'px'}, function () {
                        obj.addClass('act');
                    });
                    $('.b-zuopinPic img').animate({marginTop:'0px'});
                }
            });


        });

*/

        /*var img = $('.b-zuopinPic>img')[0];
        var maxHeight, initHeight = 400;
        img.onload = function () {
            maxHeight = $('.b-zuopinPic img').height();
            if (maxHeight > initHeight) {
                $('.b-zuopinPic').css({
                    height: initHeight + 'px',
                    overflow: 'hidden',
                    cursor: 'pointer'
                });
                $('.b-zuopinPic').on('click', function () {
                    var obj = $(this);
                    if (obj.hasClass('act')) {
                        obj.animate({height: initHeight + 'px'}, function () {
                            obj.removeClass('act');
                        });
                        $('.b-zuopinPic img').animate({marginTop:'-100px'})
                    } else {
                        obj.animate({height: maxHeight + 'px'}, function () {
                            obj.addClass('act');
                        });
                        $('.b-zuopinPic img').animate({marginTop:'0px'});
                    }
                });
            }
        };*/
        $('.yf-img').yf_photo();
    });
</script>
</body>
</html>